<template>
    <div>
        <el-card>
            <ReturnPage></ReturnPage>
            <!-- 头部功能区 -->
            <el-row>
                <el-form inline>
                    <!-- 新增搜索 -->
                    <el-form-item>
                        <el-input placeholder="请输入名称"
                                  size="mini" />
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary"
                                   icon="el-icon-search"
                                   style="margin-left:10px"
                                   size="mini">搜索</el-button>
                        <el-button type="primary"
                                   size="mini"
                                   @click="addDiscoveryRules()">创建发现规则</el-button>
                    </el-form-item>
                </el-form>
            </el-row>
            <!-- 编辑弹框 -->
            <el-dialog title="编辑">
                <el-form ref="editForm">
                    <el-form-item label="备注"
                                  prop="remarsk"
                                  label-width="100px">
                        <el-input autocomplete="off"
                                  placeholder="请输入备注信息"></el-input>
                    </el-form-item>
                </el-form>
                <div slot="footer"
                     class="dialog-footer">
                    <el-button>取 消</el-button>
                    <el-button type="primary">确定</el-button>
                </div>
            </el-dialog>
            <!-- 列表 -->
            <el-row>
                <el-table :data="tableData"
                          style="width: 100%"
                          height="calc(100vh - 250px)"
                          :cell-style="cellStyle"
                          :default-sort="{ prop: 'date', order: 'descending' }"
                          @row-click="rowClick">
                    <el-table-column show-overflow-tooltip="ture"
                                     prop="template"
                                     label="模板"
                                     align="center">
                        <template slot-scope="scope">
                            <el-tag type="primary">{{ scope.row.template }}</el-tag>
                        </template>
                    </el-table-column>
                    <el-table-column show-overflow-tooltip="ture"
                                     prop="name"
                                     align="center"
                                     label="名称">
                        <template slot-scope="scope">
                            <el-tag type="success">{{ scope.row.name }}</el-tag>
                        </template>
                    </el-table-column>
                    <el-table-column show-overflow-tooltip="ture"
                                     prop="monitoringitems"
                                     align="center"
                                     label="监控项">
                    </el-table-column>
                    <el-table-column show-overflow-tooltip="ture"
                                     prop="trigger"
                                     align="center"
                                     label="触发器">
                    </el-table-column>
                    <el-table-column show-overflow-tooltip="ture"
                                     prop="graphical"
                                     align="center"
                                     label="图形">
                    </el-table-column>
                    <el-table-column show-overflow-tooltip="ture"
                                     prop="host"
                                     align="center"
                                     label="主机">
                    </el-table-column>
                    <el-table-column show-overflow-tooltip="ture"
                                     prop="key"
                                     align="center"
                                     label="键值">
                    </el-table-column>
                    <el-table-column show-overflow-tooltip="ture"
                                     prop="interval"
                                     align="center"
                                     label="间隔">
                    </el-table-column>
                    <el-table-column show-overflow-tooltip="ture"
                                     prop="type"
                                     align="center"
                                     label="类型">
                    </el-table-column>
                    <el-table-column show-overflow-tooltip="ture"
                                     prop="status"
                                     align="center"
                                     label="状态">
                    </el-table-column>
                </el-table>
            </el-row>
        </el-card>
    </div>
</template>
<script>
    export default {
        data () {
            return {

            };
        },
        methods: {
            //创建触发器
            addDiscoveryRules () {
                this.$router.push({
                    path: "AddDiscoveryRules",
                });
            }

        },
        created () { },
        computed: {},
    };
</script>
<style lang="scss" scoped></style>
